package org.top10.dealor;

import java.util.HashMap;
import java.util.Map;

public class PropFileDealor {
	private final static Map<String,String>props=new HashMap<String,String>();
	private final static String PROP_FILE="prop.txt";
	static {
		readConf(PROP_FILE);
	}
	public static String getPropValue(String key){
		return props.get(key);
	}
	private static void readConf(String confName){
		FileDealor.readFile(confName,new LineDealor(){
			public void dealorLine(String line) {
				String []segment=null;
					segment=line.split("\\s+");
					props.put(segment[0].trim(),segment[1].trim());
				}
		});
		}
}